<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>定位</title>
    <style>
        /* div { 
            width: 200px;
            height: 200px;
            background-color: pink;
        }
        .nav {
            background-color: blueviolet;
            position: relative;
            top: 100px;
            left: 100px;
        }

        .yeye {
            width: 500px;
            height: 500px;
            background-color: black;
            position: absolute;
        }

        .father {
            width: 300px;
            height: 300px;
            background-color: palegreen;
            margin-left: 100px;
            position: relative;
        }

        .son {
            position: absolute;
            left: 150px;
            top: 100px;
        } */
        .up {
            position: relative;
            width: 1100px;
            height: 100px;
            background-color: pink;
        }

        .arr-l {
            position: absolute;
            top: 30px;
            left: 0;
            width: 40px;
            height: 40px;
            background-color: purple;
        }

        .arr-r {
            position: absolute;
            top: 30px;
            right: 0;
            width: 40px;
            height: 40px;
            background-color: purple;
        }

        .down {
            width: 1100px;
            height: 150px;
            background-color: black;
        }
    </style>
</head>

<body>
    <!-- 相对定位 -->
    <!-- <div></div>
    <div class="nav"></div>
    <div></div> -->
    <!-- 绝对定位 -->
    <!-- <div class="yeye">
        <div class="father">
            <div class="son"></div>
        </div>
    </div> -->
    <!-- 子绝父相 -->
    <div class="up">
        <div class="arr-l"></div>
        <div class="arr-r"></div>
    </div>
    <div class="down"></div>


</body>

</html>